const {Schema, model} = require('mongoose');

const applySchema = new Schema({
    postId: {type: Schema.Types.ObjectId, ref: 'Post'},
    userId: {type: Schema.Types.ObjectId, ref: 'User'},
    status: {type: String, enum: ['applied', 'approved', 'failed']}
}, {timestamps: true})

module.exports = model('Apply', applySchema);